<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <title>退出登录</title>
    <script>
        function submitLogoutForm() {
            document.getElementById("logoutForm").submit();
        }
    </script>
</head>
<body>
    <h1>是否确认退出登录？</h1>
    
    <!-- 使用 POST 方法提交表单 -->
    <form id="logoutForm" th:action="@{/logout}" method="post">
        <!-- CSRF 令牌 -->
        <input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}" />
        <button type="submit">确认退出</button>
    </form>
</body>
</html>